package com.itheima.d03_extends_son_features2;

public class Student {


    private int id ; //0
    private String name; //null
    private double score; //0.0
    private String address; //null
    private String sex; //null
    private int age; //0
    private String college; // null

    public Student() {

    }

    //经常使用的构造方法
    public Student(String name, int age, String sex) {
        //调用兄弟构造方法，对其他属性进行赋值
        this(name, "上海", sex, age, "上海大学");
    }


    public Student(String name, String address, String sex, int age, String college) {
        this.name = name;
        this.address = address;
        this.sex = sex;
        this.age = age;
        this.college = college;
    }

    public Student(int id, String name, double score, String address, String sex, int age, String college) {
        this.id = id;
        this.name = name;
        this.score = score;
        this.address = address;
        this.sex = sex;
        this.age = age;
        this.college = college;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", score=" + score +
                ", address='" + address + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", college='" + college + '\'' +
                '}';
    }
}
